import request from '@/request/index.js';

// 勿动
// export function submitPatient(data) {
// 	return request.post({
// 		url: '/app-api/user/patient-with-treatment/saveOrUpdate',
// 		data: data || {},
// 		custom: {
// 			title: "新增/修改就诊人",
// 			authentication: true
// 		}
// 	});
// }

export function getPatientByIdNumber(idNumber) {
	return request.get({
		url: '/app-api/user/patient-with-treatment/get-patient-by-id-number',
		params: {
			idNumber
		},
		custom: {
			title: "根据身份证查询就诊人",
			authentication: true
		}
	});
}

export function bindHisPatient(data) {
	return request.post({
		url: '/app-api/user/patient-with-treatment/bind-his-patient',
		data: data,
		custom: {
			title: "绑定his就诊人",
			authentication: true
		}
	});
}

export function getPatientByHisCode(hisCode) {
	return request.get({
		url: '/app-api/user/patient-with-treatment/patient-by-his-code',
		params: {
			hisCode:hisCode
		},
		custom: {
			title: "根据His编码查询就诊人",
			authentication: true
		}
	});
}

export function submitPatient(data) {
	return request.post({
		url: '/app-api/user/patient-with-treatment/saveOrUpdate2',
		data: data || {},
		custom: {
			title: "新增/修改就诊人",
			authentication: true
		}
	});
}

export function deletePatient(params) {
	return request.post({
		url: '/app-api/user/patient-with-treatment/delete',
		params: params || {},
		custom: {
			title: "删除就诊人",
			authentication: true
		}
	});
}

export function unbindPatient(params) {
	return request.post({
		url: '/app-api/user/patient-with-treatment/unbind-patient',
		params: params || {},
		custom: {
			title: "解绑就诊人",
			authentication: true
		}
	});
}

// 暂时不用
// export function getPatientDetails(params) {
// 	return request.get({
// 		url: '/app-api/user/patient-with-treatment/get',
// 		params: params || {},
// 		custom: {
// 			title: "获取就诊人详情",
// 			authentication: true
// 		}
// 	});
// }

export function getPatientList() {
	return request.get({
		url: '/app-api/health/user/patient/list',
		custom: {
			title: "获取就诊人列表",
			authentication: true
		}
	});
}

export function switchPatient(params) {
	return request.get({
		url: '/app-api/user/patient-with-treatment/switch',
		params: params || {},
		custom: {
			title: "切换就诊人",
			authentication: true
		}
	});
}

export function sendVerCode(params) {
	return request.post({
		url: '/app-api/user/patient-with-treatment/send-sms-code',
		data: params || {},
		custom: {
			title: "发送验证码",
			authentication: true
		}
	});
}